/***********************************************/
/* This is the test class for the class 'test' */
/* It is used for messing around with JUNIT    */
/***********************************************/

/*
 * To run the class, simply hit the pretty little play button next to the bug in eclipse.
 * This will run the class.  A box called JUnit should show up next to where ever your
 * console box is.  This box will show each method and whether it passed or failed.
 * You can also use system.out.println(stuff) to print stuff to the console just like
 * any other java class if you feel so inclined.  (maybe to track variables etc.)
 */


//This stuff is important, include it in any JUNIT test class
import org.junit.* ;
import static org.junit.Assert.* ;

public class testtest {
	
	//Gotta initialize the test.java object before we can use it
    test t = new test() ;
	
	//This is what a test method looks like.
	//It is testing the divide method in out test.java class
	@Test
	public void test_divide() {
	    //This is where the magic happens.
	    //JUNIT will test if the method returns 1 (1 being the value it should return.)
		//Note I set it to 1 to check what happens when it fails.  The class actually
		//returns 2.
	    assertTrue(t.divide() == 1) ;
	   	}

	
	//This one will test our accessor and mutator
	@Test
	public void test_get_t() {
		t.set_t(3);
	    assertTrue(t.get_t() == 3) ;
	    }
}
